Template talk:Itembox
Whew I think I'm finally done with this thing. The wikicode was a right PITA. Finally had to use HTML for the tables.--Hav0c 18:53, 9 February 2009 (UTC) : Congratulations, Hav0c. You have my utmost respect Scarbrowtalk 19:55, 9 February 2009 (UTC) Accesibility I've confirmed from shadowdragon (from the forums) that the itembox template plays nice with screenreaders. That's one worry less. :) --Hav0c 21:17, 10 February 2009 (UTC) New Anchors Good job, Hav0c. The new anchors let us link individual items from other pages seamlessly, and that's good. Only thing I wonder... could it be possible that passing one or two (true/false) optional parameters to the template, the template generated automagically a " " or " " (or, now we're at it, a variable number of equal signs) heading, so items would appear in the TOC? If it's too complicated, we can still insert manual headings for the TOC, leaving the template anchors untouched (only worry, as Young Ned put it, is anchor name duplication) Scarbrowtalk 09:08, 16 February 2009 (UTC) * My primary reason for not wanting to do that is that it would add an 'edit' link above each Itembox. That would really increase the screen area taken up by the template. I'll look into it, and see if I can find an appropriate compromise. --Hav0c 09:27, 16 February 2009 (UTC) ** Ah, I never thought of that when I suggested adding headings. Interesting. Any way of getting the TOC to include the anchors that are not generated by headings? And yes, great job, Havoc! — Young Ned (talk) 10:08, 16 February 2009 (UTC) *** Turns out that it is possible to add in a heading that will be indexed by the ToC, but won't result in the 'edit' option, using style="display:none;" However, this leads to other complications, starting with the fact that html headings don't play nicely with Template:TOClimit. I'm thinking to forcing it to a , with one flag determining if it shows up as a heading or as just an anchor. Suggestions welcome. --Hav0c 11:31, 16 February 2009 (UTC) :::: The way I see it, we won't use the TOCLimit template often. We can simply put up a warning in both templates' doc that it's unwise to combine them. ::::About the , it would be suboptimal to put up a fixed header. If we can't customize the type of header it shows, it would be better to add it manually, since we don't know if we'll want to add an Itembox as a Level 2 header (like in Wrist Armour), a level 3 header (like it should be in Unique Weapons, or even lower level headers. ::::I absolutely agree there must be a flag to determine if it should be just an anchor (like now) or also a heading. Couldn't you add two parameters, one of them saying if it must be a heading, and another one saying what kind of heading it should show? :::: And finally, about the section editing that would allow, I'm not sure of your objections. You say that "That would really increase the screen area taken up by the template", but I'm not sure if that's bad at all. That was the way it was done in the previous wiki, with no objections, like it's now in Unique Weapons. Maybe that's going too far, but maybe a third parameter that would allow the editor to decide on that, if (s)he wants to let the heading show in the page or only in the TOC? ::::Scarbrowtalk 14:17, 16 February 2009 (UTC) ::::: I think that one compromise might be to add in an optional 'heading level' parameter. This would take values from 2-6, depending on the heading level desired. If it is undefined, then there is only an anchor. If there is a consensus on this, I'll add it in. ::::: Now for the 'Edit' links. My primary concern, as I said above, is with the screen real-estate that an 'edit' link above each individual itembox would take up. My primary motivation for making this template was to streamline the way item information is displayed, so that we can show say 4-5 items a page, instead of 2 like the old wiki. However, I don't mind the extra line too much, so I'm willing to go along, if I can find a way to get the edit link to show up without an addtional title before the box. --Hav0c 21:20, 16 February 2009 (UTC) ::::::That compromise seems good to me. Quick and easy, and doesn't modify the template's current way of working. About edit links... I'm not so worried about screen real-state, so what I was saying is that you could let the editor of the page decide to include them or not. In a page like Unique Weapons they would be useful because it's a page about items and nothing more, while in Tarramyre they wouldn't as they are only examples. Scarbrowtalk 22:19, 16 February 2009 (UTC) Anchors done I've added in the 'HeadingLevel' parameter, as discussed above, and as a bonus, added an automagic anchor by item ID, for use in those cases where 'Name' is not unique.--Hav0c 12:15, 17 February 2009 (UTC) :Excellent work, as always. Congratulations Scarbrowtalk 12:27, 17 February 2009 (UTC) ::Thanks. Let me know if there are any bugs. If not, I'll upgrade Template:Questbox to this format too. --Hav0c 12:30, 17 February 2009 (UTC) :::I don't see any bugs, you can go ahead with what you have in mind Scarbrowtalk 11:28, 20 February 2009 (UTC) New Parameter I've added an optional parameter MarketValue to show the shops valoration of the item's real value, with a link to Item Selling Guide to explain what means the "Real Market Value" (I've still got to migrate that one). Let me know if there are any bugs with it. Seems I'm starting to understand templates a little, at least enough to modify existing ones. Scarbrowtalk 11:28, 20 February 2009 (UTC) : I'd suggest calling it just 'Value', with the link explaining the details. I'll test out the table code for bugs as I get time. --Hav0c 11:33, 20 February 2009 (UTC) :: And why not GoldValue or RealValue? I believe the name has to be self-explanatory, and "Value" could lead to confusion. Or there is some technical advantage in a shorter name?Scarbrowtalk 14:02, 20 February 2009 (UTC) ::: Two reasons. The 'Technical', trivial one, is simply about screen real estate, if the user has a lower screen width. Only slightly more importantly, I feel that 'RealValue' is not much easier to understand than 'Value'. As a compromise, I'd suggest either of the following: :::# Value: 1080 gold :::# Worth 1808 gold ::: In each case, the first word would be a link --Hav0c 04:40, 21 February 2009 (UTC) ::::Ok, Value is fine with me. Proceed with the changes when you want, I'm too exhausted from the images uploading Scarbrowtalk 07:33, 21 February 2009 (UTC) ::::: Done. --09:27, 21 February 2009 (UTC) 'Notes' Parameter I've added in a 'Notes' parameter, so that we can incorporate into the box all other relevant information, instead of having a line of text below the box. --Havoc (talk) 09:27, 21 February 2009 (UTC) : The new parameter is useful, but I think that it should say explicitely "Notes" on some part, although the formatting is quite clear. Also, I would use a grey with more black on it, more intense. It's a little difficult to read right now. Would have changed it myself, but I don't understand what the " " parts mean (literal bars? why not write them directly?) and I don't want to scramble anything. Scarbrowtalk 14:05, 21 February 2009 (UTC) :: I've made the fixes you suggested. The is used to create a |, as you've guessed, in order to differentiate the bars that are used for table formatting in the final page from the bars that are used to separate the parameters passed to #if. --Havoc (talk) 14:57, 21 February 2009 (UTC) ::: Looks like there's a problem with the Notes...--Shadowblack 23:33, 17 April 2009 (UTC) :::: Where at? The various examples on the Template page are okay, and cover the different possibilities. I may have messed something up when updating the template, but I don't see it. K!ZeRotalk 03:19, 18 April 2009 (UTC) :::: Okay, I see it with the startup scenario items ( , Dragonscale Amulet) that have links. I'll look into it. K!ZeRotalk 03:23, 18 April 2009 (UTC) ::::: Fixed. K!ZeRotalk 03:30, 18 April 2009 (UTC) Changes to Req<> parameters A couple questions: * What is the advantage of the new Itembox layout? I found that the former one was simple and easy to use, why change it? I feel the less changes to an already established standard, the better. * How do the numbered parameters ( ,etc ) work? Are they positional? I'm worried that if somebody uses parameters in another order (like putting Desc on the end, or at the beginning), the layout may be broken. * I suppose you changed all pages in which the template was used with requirements? Scarbrowtalk 22:34, 22 February 2009 (UTC) : To answer your points one by one: :# I've been trying to set up a macro in UltraEdit to automatically convert text from our original format to the wiki format needed. This is based on a simple 'Find' and 'Replace' and works quite well, apart from the 'Requirements' bit, where it has no way of figuring out whether it should label the line as Req1, Req2, etc. Getting rid of the parameter name solves this problem. I understand that it is on its way to being an established standard, but I felt that since it is still just a few of us editing, the convenience outweighed the adjustment period. :# The order of all named parameters is immaterial. } will always refer to the first unnamed parameter, and so on. :# Yes, I went through all the pages that used this template, making updates as and where needed. :--Havoc(talk) 04:39, 23 February 2009 (UTC) ::Oh, that's cool. I also use Ultraedit, and that macro would be useful. Thanks for updating the linked pages. Scarbrowtalk 05:05, 23 February 2009 (UTC) ::: I'd somehow missed this message. I've uploaded the macro now, and you can find it at User:Hav0c/Item Macro--Havoc(talk) 17:29, 4 March 2009 (UTC) Unidentified items Do we really need the title bar to say 'Unidentifed Item'? The item name already contains the term 'Unidentified'. --Havoc(talk) 06:16, 4 March 2009 (UTC) :I'm guessing it is to provide a link to Unidentified Items. The link could be useful to describe how to identify items. If all of these items have "Unidentified" in the name, maybe it is possible in the template to make that part of the name linked. Looking at the template code, I couldn't make much out, but possibly: If Unidentified = True, set the name = Unidentified + Name(substring(14,end)), Else set name = Name ..? K!ZeRo 15:21, 4 March 2009 (UTC) :: That makes sense. Given our current discussions about item management, I think it would be best to have the item name itself link to the main item page. So we can leave the 'Unidentified Item' bit as it is. --Havoc(talk) 17:32, 4 March 2009 (UTC) Automatically adding to Category:Item I don't think we should be doing this. The itembox template is used on a lot of pages that are definitely not items, such as Conjuration. I'm reverting the edit for now, pending further discussion. --Havoc(talk) 09:13, 19 March 2009 (UTC) :You beat me to my post...: :I had suggested that the individual items pages might possibly generate categories for themselves with some template coding. So I updated the template to add pages (that transclude the template) to the Items category. The idea for this (User_talk:Scarbrow#Nevernal_edit) was so that we could have category lists such as +NV items be auto-populated. :However, the problem is that when viewing the page (e.g., Dragonscale Amulet), I see the Items category listed. But clicking that link to see the category list doesn't show that page...? This might be because Hav0c's revert came about while I was testing this out, not sure. :Another thing to think about if we implement this is that if a page transcludes the specific Item page, it will also be categorized with whatever categories the Item page is in. (I don't think there is a way around this using include tags, since the template must be also transcluded.) K!ZeRotalk 09:29, 19 March 2009 (UTC) :: I agree with you on the +NV etc categories. My solution would be the following: ::* We leave this template as it is ::* We create a new 'Itempage' template, which we use when using the bot to create pages about items. That template takes the same parameters as this template, and then calls the itembox template to display the actual item box. It also categorizes the page depending on the various boosts. ::--Havoc(talk) 11:36, 19 March 2009 (UTC) ::: So like a wrapper template? This will work also, so that the include tags are in Itempage. K!ZeRotalk 16:54, 19 March 2009 (UTC) Okay, I have made Template:Itempage. It will correctly call the Itembox template, and perform automatic categorization of any page that uses Itempage (while leaving alone the pages that use Itembox). See Dragonscale Amulet and . 2 things though: #The category that I hastily made under Items (Category:MR) should probably be renamed "MR-affecting Items" or similar; I don't think non-admins can do anything to fix that. #And the original desire of simply transcluding the item's article still probably won't work without having these automatic categories also being incorrectly added (see the Sandbox). I'll try things out later if no one has ideas. K!ZeRotalk 10:52, 17 April 2009 (UTC) :I just found a nice extension that could help us with this: Labeled Section Transclusion. I'll just see if we can get it enabled on our wiki. --Havoc(talk) 02:37, 19 April 2009 (UTC) :: I've been having problems submitting things, and thought I put something up here on the Talk page about my recent updates. But I've made changes to this template to just take an extra optional Categorize parameter. If true, it will categorize the page calling this template (see previous examples of and Sandbox). Using the default include tags on the individual item page (basically, don't include the Categorize parameter) thus allows us to transclude the items without having those other pages categorized. So basically, for what we were thinking of doing with items and transclusion, we don't need the extension (it is nice though). K!ZeRotalk 03:12, 19 April 2009 (UTC) :::Wow, K!Zero, I bow to your persistence. This template is becoming the pride of our wiki. Very smart move, that include/noinclude little game. Maybe we could use another couple of categories, though, like Magical Items (more general than just Magical Weapons). It's also good that the template adds the page to all the applicable categories. I'm linking the description to this discussion, so as to further clarify the Categorization mechanism Scarbrowtalk 04:19, 19 April 2009 (UTC) :::: Hah, thanks! I should have thought it through a bit before making that new (deleted) template though; guess we all didn't see the possibility for it. I know what you mean about additional categories, but since the only change needed would be on the template itself (the item pages just need the Categorize parameter), I figured to leave the template in an initial "proof of concept" stage for now. I think some discussion about item categories probably needs to be done since I see different levels of resolution that we can do, and with the difficulty of changing categories around, was going to wait for that. I'll start a new topic for it. K!ZeRotalk 05:02, 19 April 2009 (UTC) Item subcategories for auto-categorization A general consensus on how to organize Item subcategories is probably needed. I feel that while we can certainly make and auto-populate categories such as "Unidentified Items" (note that this is already an article name), I like minimalist approaches and should only make categories for which people would actually need to use. With that basis, I will put an outline at the end of this topic, which can be updated freely. Just add comments immediately after this message. Note that these categories will need to be auto-populated with only the information passed into the template. p.s. I only started playing 2 months ago and haven't even gotten my QS yet (1 month left to get those ATs!), so I really don't know the categories people would "actually use"; I left them fairly high-level but go ahead and add more specific categories, like Tallys' head armour. p.p.s. Scarbrow, I left out "Magical Items" since I didn't think it'd be useful as a category, and with my initial division between Weapons and Armour, it is hard to then know where to place e.g. a "Magical Weapons" subcategory. K!ZeRotalk 06:03, 19 April 2009 (UTC) :Phew, that was really a thorough approach. I basically agree with everything, except some minor tweaks (and as they're minor I think we should leave them for AFTER we're done with Item pages creation, bot or not). However, what should we do with manually-supported (that is, the current ones) pages with lists of items? Scarbrowtalk 01:27, 22 April 2009 (UTC) :: Any categories we want to implement will just be updated through this template, so tweaks to the proposed structure can go ahead simultaneously. It probably won't get implemented until we actually have enough items to make it worthwhile anyway, so it'll be after item pages are done. Just a note so that others who happen across this can put in their ideas. As for manual lists, some of them (Rings, Wrist Armour) would be covered by simple categories. For ones from quests, if the Notes section of an itembox has a reference to a quest name, that could be used to populate categories. Some lists don't seem as useful, or are replaceable, with auto-categories (Unique Armour). K!ZeRotalk 08:05, 22 April 2009 (UTC) Proposed Items category structure * Items (parent category) ** Weapons (subcategory1) (did not further divide into non-magical weapons since didn't think they are useful) *** Magical Weapons (subcategory2) **** Magical Bashing Weapons (subcategory3) **** Magical Hacking Weapons **** Magical Lances **** Magical Polearms **** Magical Slashing Weapons **** Magical Stabbing Weapons **** Magical Staves **** Magical Troll-Bonts **** Magical Power Weapons (different name? are they all magical? basically, weapons with a Power) **** Magical Favored Enemy Weapons (different name? are they all magical? basically, weapons that are special against certain enemy types) ** Armour (don't think magical vs. non-magical is relevant for armour wrt game mechanics as some uniques are non-magical) *** Shields *** Torso Armour *** Head Armour *** Hand Armour *** Feet Armour *** Arm Armour *** Leg Armour *** Neck Armour *** Wrist Armour *** Rings *** Waist Armour *** Back Armour *** Tabards ** Stat Items *** MR Items *** SP Items *** NV Items *** Ability Items **** Agility Items **** Body Items **** Might Items **** Aura Items **** Mind Items **** Spirit Items **** Luck Items ** Tallys' Items *** Tallys' Weapons *** Tallys' Armour ** Conjured Items ** Miscellaneous Items ** Useable Items (? would this be a practical new Itembox parameter) ** Icons ::: Well, it's done. If anybody gets more ideas for practical categories (I could make categories for "Items requiring 50+ in xxx skill", but I find that would be useless) please contact me. Scarbrowtalk 00:18, 6 August 2009 (UTC) Getting rid of the 'Categorize' paramater. Since all items will now have their own namespace, we no longer need the categorize paramater. We can just get rid of it, and add in code to categorize if the template is called from the Item namespace. We can do the same for quests too. --Havoc(talk) 09:18, 9 May 2009 (UTC) : That would be a good move. BTW, do you happen to know why the article count is only 2 articles right now? Scarbrowtalk 23:29, 11 May 2009 (UTC) ::I'll go ahead and make the changes. As for the article count... :::There was a small bug in our config tool that trimmed off one of the settings where it shouldnt have. Your wiki settings are now corrected, but it may take a little time for the numbers on the wiki to update. Sorry for the confusion and inconvenience. ::--Havoc(talk) 03:58, 12 May 2009 (UTC) Color of link to the page name The changes I've just done have two objectives: * They remove the expensive #ifexist function, so now you can include as many Itemboxes in a single page as you want. * They allow for the use of standard-color in links, that is, blue for existing pages and red for non-existing ones. This should also alert new users of the fact that the name of the item is a link to the Item page. Please comment if you can think of a better way to do it. As with all template changes, it will take a couple of days to correctly reflect in all pages Scarbrowtalk 16:14, October 20, 2009 (UTC) Auto-categorize limited-time items Should limited-time items be auto-categorized? Currently those items are left out of the special items categories, like MR-affecting, etc. I'm thinking they should be auto-categorized. I'd want to be able to pull up all MR-boosting items and see the entire list, and see what items I might have that can help boost my MR, including limited-time items. If I don't have an item and may consider getting it, I would click on the item link and check out the page to see how to obtain the item. Then, I would see that it's limited-time and not available to me, or maybe I didn't close out the event yet, or (while unlikely) the event is still on-going. It seems safer to include limited-time items than not. K!ZeRotalk 05:48, October 2, 2010 (UTC) : I reasoned in exactly the opposite way when I removed them from auto-categorized lists: A random user wants items improving his MR, pulls up the list, looks for a good one... and is no longer available. Looks for another one... and the same. This is not unlikely to happen: as reported on Category:Items, right now 358 of the total 2042 item pages (that's a 17%) are about items no longer available. I think if you want to look at all the possible items, you can easily check the Items no longer available and the Tallys Limited Time Items categories, plus the appropriate one. But if you let no longer available items to be categorized along every other one, there is no way to tell them apart. Do you think the issue is so important as to warrant a second set of categories below the "no longer available" ones? Scarbrowtalk 18:52, October 2, 2010 (UTC) :: I agree we don't need the second set of categories; probably not worth it. We can leave it alone for now, until people feel it should be changed. I'll go ahead and note it on all the relevant category pages though, with a link to the above categories you provided, so that this division is clear. :: EDIT: Nevermind, that's a ton of categories. And I noticed it's already mentioned on Category:Items no longer available. I also noticed though that some manual item categories (e.g. Category:Weapons_vs_Undead) contain limited-time items which is contrary to auto-cat; won't edit anything for now though. K!ZeRotalk 07:27, October 3, 2010 (UTC) ::: That is because the "Vs Bonus" categories are manually maintained - No template magic there. Scarbrowtalk 02:11, October 4, 2010 (UTC) :::: Right, I'm just noting that we aren't consistent in the categorizing, in case we end up making a general guideline later. K!ZeRotalk 04:51, October 4, 2010 (UTC) ::::: Oh, I see now what you meant. Good note. Although they are small categories, for some of them the bulk the weapons are no longer available. I'll put a note on those categories about that. Scarbrowtalk 15:54, October 4, 2010 (UTC) Unidentified versions not autocategorized? I've just realized that the two Unidenified and Identied versions of the same item are usually shown on the same category listing (see at Category:Magical Weapons). I see no benefit of a duplicated entry, so I think we should remove the Unidentified version of items of the auto-categorization (saved, of course, the general "By ID" and "By name" categories). Thoughts? Scarbrowtalk 16:08, October 4, 2010 (UTC) : I think we can remove them. I don't see a reason why anyone would try to hunt down an unidentified item. K!ZeRotalk 02:23, October 5, 2010 (UTC) Technical Question I'm having a technical difficulty. Is there a way to display an itembox on another page, the way you can with a questbox? i.e. becomes :Sure: :becomes :And please remember to sigh your edits on Talk pages. :--Shadowblack 18:32, January 13, 2012 (UTC) :: Strange. I tried that with the Ring of Greater Warding and couldn't get it to work. I must have been typing something wrong. Psychoadept 20:08, January 13, 2012 (UTC) :: Oh, I know what I was doing. *facepalm* Just needed to capitalize Of. Psychoadept 20:09, January 13, 2012 (UTC)